package com.sxz.sbs.module.order.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sxz.sbs.R;
import com.sxz.sbs.app.GlideApp;
import com.sxz.sbs.module.order.mode.OrderGroupBean;
import java.util.List;
/**
 * 订单状态
 * @author rr
 * @date 2016/7/2
 */
public class OrderTypeAdapter extends BaseQuickAdapter<OrderGroupBean,BaseViewHolder> {

    public OrderTypeAdapter(@Nullable List<OrderGroupBean> data) {
        super(R.layout.item_ordertype,data);
    }

    @Override
    protected void convert(BaseViewHolder helper, OrderGroupBean item) {
        GlideApp.with(mContext).load(item.getIconUrl())
                .placeholder(R.drawable.img_default).into((ImageView) helper.getView(R.id.image_ordertype));
        helper.setText(R.id.text_tv,item.getName());
        if (item.getIsRead()==0){
            helper.setVisible(R.id.image_point,true);
        }else {
            helper.setVisible(R.id.image_point,false);
        }
    }
}
